
import requests

response = requests.get("https://www.baidu.com/")

# 重新设置编码
response.encoding = 'utf-8'

# 获取文本数据
print(response.text)

# 获取状态码
print(response.status_code)